package com.fadadianqi.logistics.admin.controller.form;

import com.fadadianqi.commons.JSONProvider;

import java.io.Serializable;

public class AjaxResult implements Serializable {

    /**
     *
     */
    private static final long serialVersionUID = 8724924990570026495L;

    public AjaxResult(Object data, Boolean succeed, String msg) {
        this.data = data;
        this.succeed = succeed;
        this.msg = msg;
    }

    private String msg;
    private Boolean succeed = Boolean.FALSE;
    private Object data;

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Boolean getSucceed() {
        return succeed;
    }

    public void setSucceed(Boolean succeed) {
        this.succeed = succeed;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public String toJSON() {
        return JSONProvider.toJSON(this);
    }
}
